const origin = [
  {
    controlId: '5acf276d29a1e140d0a192da',
    controlName: '文本框',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 2,
    row: 0,
    col: 0,
    index: 0,
    validate: null,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: null,
    options: null,
    printHide: false,
    required: true,
    enumDefault: 0,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: false,
    value: '哈哈哈哈',
    dataList: null,
    hint: '填写文本内容',
    needEvaluate: false,
    innerRow: 0,
    default: null,
  },
  {
    controlId: '5acf276d29a1e140d0a192e0',
    controlName: '单选下拉菜单',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 11,
    row: 3,
    col: 1,
    index: 6,
    validate: null,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: '',
    options: [
      {
        key: '1',
        value: '选项1',
        index: 1,
        isDeleted: false,
        unitType: null,
        limit: null,
        disabled: false,
        deleted: false,
      },
      {
        key: '10',
        value: '选项2',
        index: 2,
        isDeleted: false,
        unitType: null,
        limit: null,
        disabled: false,
        deleted: false,
      },
      {
        key: '100',
        value: '选项3',
        index: 3,
        isDeleted: false,
        unitType: null,
        limit: null,
        disabled: false,
        deleted: false,
      },
    ],
    printHide: false,
    required: true,
    enumDefault: 0,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: true,
    value: '10',
    dataList: null,
    hint: '请选择',
    needEvaluate: false,
    innerRow: 0,
    default: '1',
  },
  {
    controlId: '5acf276d29a1e140d0a192df',
    controlName: '时间',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 15,
    row: 3,
    col: 0,
    index: 5,
    validate: null,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: null,
    options: null,
    printHide: false,
    required: true,
    enumDefault: 1,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: true,
    value: '2018-04-12',
    dataList: null,
    hint: '',
    needEvaluate: false,
    innerRow: 0,
    default: '',
  },
  {
    controlId: '5acf276d29a1e140d0a192e3',
    controlName: '人员选择',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 26,
    row: 6,
    col: 0,
    index: 9,
    validate: null,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: null,
    options: null,
    printHide: false,
    required: true,
    enumDefault: 0,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: true,
    value:
      '{"accountId":"59280672-26fa-421f-b6cb-837d8f8777d9","fullname":"包永盛","avatar":"https://pic.mingdao.com/UserAvatar/276c4f34-2619-4f0b-b7dc-3687c18661fd.jpg?imageView2/1/w/100/h/100/q/90"}',
    dataList: null,
    hint: '请选择人员',
    needEvaluate: false,
    innerRow: 0,
    default: null,
  },
  {
    controlId: '5acf276d29a1e140d0a192dd',
    controlName: '金额',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 8,
    row: 2,
    col: 0,
    index: 3,
    validate: null,
    dot: 2,
    unit: '元',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: null,
    options: null,
    printHide: false,
    required: true,
    enumDefault: 0,
    enumDefault2: 2,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: true,
    value: '122.00',
    dataList: null,
    hint: '填写金额',
    needEvaluate: false,
    innerRow: 0,
    default: null,
  },
  {
    controlId: '5acf276d29a1e140d0a192e1',
    controlName: '时间段',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 17,
    row: 4,
    col: 0,
    index: 7,
    validate: null,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: '0',
    options: null,
    printHide: false,
    required: true,
    enumDefault: 1,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: false,
    value: '1523462400000,1523462400000',
    dataList: null,
    hint: '',
    needEvaluate: false,
    innerRow: 0,
    default: '',
  },
  {
    controlId: '5acf276d29a1e140d0a192de',
    controlName: '大写金额',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 25,
    row: 2,
    col: 1,
    index: 4,
    validate: null,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: '$5acf276d29a1e140d0a192dd$',
    options: null,
    printHide: false,
    required: null,
    enumDefault: 0,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: true,
    value: '壹佰贰拾贰元整',
    dataList: null,
    hint: '通过 金额 生成',
    needEvaluate: false,
    innerRow: 0,
    default: null,
  },
  {
    controlId: '5acf276d29a1e140d0a192db',
    controlName: '手机号码',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 3,
    row: 1,
    col: 0,
    index: 1,
    validate: true,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: null,
    options: null,
    printHide: false,
    required: true,
    enumDefault: 0,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: true,
    value: '18766666666',
    dataList: null,
    hint: '填写手机号码',
    needEvaluate: false,
    innerRow: 0,
    default: null,
  },
  {
    controlId: '5acf276d29a1e140d0a192e5',
    controlName: '附件',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 14,
    row: 7,
    col: 0,
    index: 11,
    validate: null,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: null,
    options: null,
    printHide: null,
    required: true,
    enumDefault: 0,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: false,
    value:
      '[{"attachmentType":1.0,"fromType":7.0,"fileID":"9083b553-a280-4fcf-acb5-f1409cdfb1bf","sourceID":"5acf2801eb138a06c10de37d","commentID":"5acf276d29a1e140d0a192e5","docVersionID":"9083b553-a280-4fcf-acb5-f1409cdfb1bf","accountId":"bdc9ef24-94c5-49f7-81d8-067243d20a4f","createUserName":"母校(我是用户姓名)","createUserAvatar":"https://dn-mdpic.qbox.me/UserAvatar/7c61db57-8875-45f5-9ee8-8d92593c311e.png?imageView2/1/w/48/h/48/q/90","originalFilename":"Slice","ext":".png","filesize":3508.0,"appID":"c24fdcc7-adcd-4c43-84ab-1f5249fbdb19","createTime":"2018/4/12 17:34:44","updateTime":"2018/4/12 17:34:44","thumbnailName":"MEKFdJdJbOzDbwg_2421673500.png?imageView2/1/w/200/h/118","thumbnailPath":"https://dn-mdpic.qbox.me/pic/201804/12/","middleName":"MEKFdJdJbOzDbwg_2421673500.png?imageView2/1/w/470/h/312","middlePath":"https://dn-mdpic.qbox.me/pic/201804/12/","largeThumbnailName":"MEKFdJdJbOzDbwg_2421673500.png?imageView2/2/w/1280/h/800","largeThumbnailPath":"https://dn-mdpic.qbox.me/pic/201804/12/","filename":"MEKFdJdJbOzDbwg_2421673500.png","filepath":"https://dn-mdpic.qbox.me/pic/201804/12/","allowDown":"ok","privateDownloadUrl":"https://dn-mdpic.qbox.me/pic/201804/12/MEKFdJdJbOzDbwg_2421673500.png?attname\\u003dSlice.png\\u0026e\\u003d1523529290\\u0026token\\u003dQCLMePM7TGMVvirxL32Y9696IlLrdz4OsGRlRoWB:awM5aY2jhTrxw8TyzOagfL_-dN0\\u003d"}]',
    dataList: null,
    hint: '',
    needEvaluate: false,
    innerRow: 0,
    default: null,
  },
  {
    controlId: '5acf276d29a1e140d0a192dc',
    controlName: '数值',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 6,
    row: 1,
    col: 1,
    index: 2,
    validate: null,
    dot: 2,
    unit: '个',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: null,
    options: null,
    printHide: false,
    required: true,
    enumDefault: 0,
    enumDefault2: 2,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: true,
    value: '122.00',
    dataList: null,
    hint: '填写数值',
    needEvaluate: false,
    innerRow: 0,
    default: null,
  },
  {
    controlId: '5acf276d29a1e140d0a192e2',
    controlName: '选项',
    templateId: {
      timestamp: 1523525371,
      machineIdentifier: 2728417,
      processIdentifier: 16592,
      counter: 10588889,
      date: '2018-04-12 17:29:31',
      time: 1523525371000,
      timeSecond: 1523525371,
    },
    type: 9,
    row: 5,
    col: 0,
    index: 8,
    validate: null,
    dot: 0,
    unit: '',
    ctyp: null,
    reltyp: null,
    defaultMen: null,
    dataSource: null,
    options: [
      {
        key: '1',
        value: '选项1',
        index: 1,
        isDeleted: false,
        unitType: null,
        limit: null,
        disabled: false,
        deleted: false,
      },
      {
        key: '10',
        value: '选项2',
        index: 2,
        isDeleted: false,
        unitType: null,
        limit: null,
        disabled: false,
        deleted: false,
      },
      {
        key: '100',
        value: '选项3',
        index: 3,
        isDeleted: false,
        unitType: null,
        limit: null,
        disabled: false,
        deleted: false,
      },
    ],
    printHide: false,
    required: true,
    enumDefault: 0,
    enumDefault2: 0,
    tempId: null,
    formId: null,
    u: '2018-04-12 17:33:57',
    c: '2018-04-12 17:31:25',
    half: false,
    value: '10',
    dataList: null,
    hint: '请选择',
    needEvaluate: false,
    innerRow: 0,
    default: '1',
  },
  {
    value: '5',
    controlId: '5ad0808c442bf347b05b1365',
    controlName: '等级',
    type: 28,
    row: 5,
    col: 0,
    hint: '',
    dot: 0,
    unit: '',
    enumDefault: 1,
  },
  {
    value: '10',
    controlId: '5ad0808c442bf347b05b1366',
    controlName: '等级',
    type: 28,
    row: 6,
    col: 0,
    hint: '',
    dot: 0,
    unit: '',
    enumDefault: 2,
  },
  {
    value: '11',
    controlId: '5ad4478f442bf34f68d06384',
    controlName: '选项',
    type: 10,
    row: 1,
    col: 0,
    hint: '请选择',
    dot: 0,
    unit: '',
    enumDefault: 0,
    options: [
      {
        key: '1',
        value: '选项1',
        index: 1,
        isDeleted: false,
      },
      {
        key: '10',
        value: '选项2',
        index: 2,
        isDeleted: false,
      },
      {
        key: '100',
        value: '选项3',
        index: 3,
        isDeleted: false,
      },
    ],
    half: false,
  },

  {
    value: '932422338@qq.com',
    controlId: '5ad5aa23442bf354040511e0',
    controlName: '邮件地址',
    type: 5,
    row: 9,
    col: 0,
    hint: '填写邮件地址',
    dot: 0,
    unit: '',
    enumDefault: 0,
    half: true,
  },
  {
    value: '321324199401011401',
    controlId: '5ad5aa23442bf354040511e1',
    controlName: '身份证',
    type: 7,
    row: 9,
    col: 1,
    hint: '填写身份证',
    dot: 0,
    unit: '',
    enumDefault: 1,
    half: true,
  },
  {
    value: '北京市/市辖区/崇文区',
    controlId: '5ad5aa23442bf354040511e2',
    controlName: '地区',
    type: 24,
    row: 10,
    col: 0,
    hint: '',
    dot: 0,
    unit: '',
    enumDefault: 0,
    half: true,
  },
  {
    value:
      '[{"type":4,"sid":"58db7f59442bf2119cb45591","sidext":"","accountId":"6fc5e697-d259-4aa5-9712-b98a91963899","fullname":"裴晓闯","avatar":"https://pic.mingdao.com/UserAvatar/12800479-9B97-4A2E-A5A8-47D78BCFF55D.jpg?imageView2/1/w/48/h/48/q/90","name":"引导   002","ext1":".gif","ext2":"","link":"http://t.cn/RXv6LN9","projectId":"If you need to return a value, contact the developer."}]',
    controlId: '5ad5ae93442bed3440db1fed',
    controlName: '关联',
    type: 21,
    row: 11,
    col: 0,
    hint: '',
    dot: 0,
    unit: '',
    enumDefault: 0,
  },
  {
    value: 'sssvvss',
    controlId: '5ad5ae93442bed3440db1fee',
    controlName: '备注',
    type: 10010,
    row: 12,
    col: 0,
    hint: '',
    dot: 0,
    unit: '',
    enumDefault: 0,
    dataSource: 'sssvvss',
    half: false,
  },
  {
    value:
      '[{"attachmentType":1,"fromType":3,"fileID":"c6920348-f36c-4ff0-b055-ef53d4b6798f","sourceID":"b9d37108-9a70-4c5d-a462-54aee1a4c1e8","commentID":"5ad5ae93442bed3440db1fef","docVersionID":"c6920348-f36c-4ff0-b055-ef53d4b6798f","accountId":"6fc5e697-d259-4aa5-9712-b98a91963899","createUserName":"裴晓闯","createUserAvatar":"https://pic.mingdao.com/UserAvatar/12800479-9B97-4A2E-A5A8-47D78BCFF55D.jpg?imageView2/1/w/48/h/48/q/90","originalFilename":"amap_bus","ext":".png","filesize":3748,"appID":"","createTime":"2018/4/17 16:26:05","updateTime":"2018/4/17 16:26:05","thumbnailName":"NLzfyvlTYShQXpy_3607153837.png?imageView2/1/w/200/h/118","thumbnailPath":"https://dn-mdpic.qbox.me/pic/201804/17/","middleName":"NLzfyvlTYShQXpy_3607153837.png?imageView2/1/w/470/h/312","middlePath":"https://dn-mdpic.qbox.me/pic/201804/17/","largeThumbnailName":"NLzfyvlTYShQXpy_3607153837.png?imageView2/2/w/1280/h/800","largeThumbnailPath":"https://dn-mdpic.qbox.me/pic/201804/17/","filename":"NLzfyvlTYShQXpy_3607153837.png","filepath":"https://dn-mdpic.qbox.me/pic/201804/17/","viewType":1,"viewUrl":"https://pic.mingdao.com/pic/201804/17/NLzfyvlTYShQXpy_3607153837.png?imageMogr2/auto-orient&e=1523957218&token=QCLMePM7TGMVvirxL32Y9696IlLrdz4OsGRlRoWB:7OXRPuODrfDuXJkvIzqz03dvkPM=","previewUrl":"https://pic.mingdao.com/pic/201804/17/NLzfyvlTYShQXpy_3607153837.png?imageMogr2/auto-orient|imageView2/1/w/160/h/100/q/90&e=1523957218&token=QCLMePM7TGMVvirxL32Y9696IlLrdz4OsGRlRoWB:pAqUTbaqi6AkQ0Kpcdc9mdB55Po=","allowDown":"ok","downloadUrl":"http://wwwapi.dev.mingdao.netfile/downDocument?fileID=c6920348-f36c-4ff0-b055-ef53d4b6798f"},{"attachmentType":2,"fromType":3,"fileID":"d8ff8999-b288-4a3b-9a6e-73cae0728745","sourceID":"b9d37108-9a70-4c5d-a462-54aee1a4c1e8","commentID":"5ad5ae93442bed3440db1fef","docVersionID":"d8ff8999-b288-4a3b-9a6e-73cae0728745","accountId":"6fc5e697-d259-4aa5-9712-b98a91963899","createUserName":"裴晓闯","createUserAvatar":"https://pic.mingdao.com/UserAvatar/12800479-9B97-4A2E-A5A8-47D78BCFF55D.jpg?imageView2/1/w/48/h/48/q/90","originalFilename":"aa","ext":".txt","filesize":0,"appID":"","createTime":"2017/8/22 11:18:03","updateTime":"2017/8/22 11:18:03","filename":"afKBmtLsGoDSzTk_176608657","shareUrl":"http://c784dd151a94f62f.share.mingdao.net/apps/kcshare/599ba26b442bf2330c339eaf","viewType":2,"viewUrl":"https://doc.mingdao.com/doc/201708/22/afKBmtLsGoDSzTk_176608657.txt?e=1523957218&token=QCLMePM7TGMVvirxL32Y9696IlLrdz4OsGRlRoWB:O8CRgkevv8zfNyzZSS54VzwFN64=","previewUrl":"","refId":"599ba26b442bf2330c339eaf","refType":1,"allowPreview":false,"downloadUrl":"https://www.mingdao.com/api/file/downKcFile?id=599ba26b442bf2330c339eaf&isOldest=true","allowDown":"ok"}]',
    controlId: '5ad5ae93442bed3440db1fef',
    controlName: '附件',
    type: 14,
    row: 13,
    col: 0,
    hint: '',
    dot: 0,
    unit: '',
    enumDefault: 0,
    half: false,
  },
];

export function getWorkSheetData(data) {
  return data.map((record) => {
    const result = {};
    record.forEach((item) => {
      result[item.controlId] = item.value;
    });
    return result;
  });
}

export function getSheetRowsAndTem() {
  return {
    template: {
      controls: origin,
    },
  };
}

export function getData() {
  return getWorkSheetData([...new Array(24)].map(a => origin));
}
